package com.googlecode.rotools.rodb;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;

class SqlUtil {
	static void setString(PreparedStatement statement, int index, String value) throws SQLException{
		if(value == null){
			statement.setNull(index, Types.VARCHAR);
			
		}else{
			statement.setString(index, value);
			
		}
	}
	static void setInteger(PreparedStatement statement, int index, Integer value) throws SQLException{
		if(value == null){
			statement.setNull(index, Types.VARCHAR);
			
		}else{
			statement.setInt(index, value);
			
		}
	}
}
